package com.mayisoftware.mayioa.business.statistic.impl.dao;

import com.mayisoftware.mayioa.business.statistic.api.domain.StatisDate;
import com.mayisoftware.mayioa.business.statistic.api.domain.StatisDept;
import com.mayisoftware.mayioa.business.statistic.api.domain.StatisType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 统计查询DAO
 */
@Mapper
public interface StatisticMapper {

    /**
     * 根据类型统计
     */
    List<StatisType> selectStatisByType();

    /**
     * 根据部门统计
     */
    List<StatisDept> selectStatisByDept();

    /**
     * 根据日期统计
     */
    List<StatisDate> selectStatisByDate(@Param("loginUserId") Long loginUserId);

    /**
     * 按区域统计
     */
    List<Map> selectStatisByRegion(@Param("loginUserId") Long loginUserId);

    /**
     * 按部门统计
     */
    List<StatisDept> selectCountStatisByDept(@Param("loginUserId") Long loginUserId);


    /**
     * 按部门和骨干类型统计
     */
    List<StatisDept> selectCountStatisByDeptAndUserType(@Param("loginUserId") Long loginUserId);

    /**
     * 按部门和时间统计
     */
    List<StatisDept> selectCountStatisByDeptAndDateInfo(@Param("loginUserId") Long loginUserId);

    /**
     * PM按角色类型查询
     */
    List<StatisDept> selectCountPMStatisByProjectRole(@Param("userId") Long userId);

    /**
     * PM按月查询
     */
    List<StatisDept> selectCountPMStatisByDateInfo(@Param("userId") Long userId);

}
